home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / gopher / Unix / GopherTools / gee.shar.Z / gee.shar / getdirs < prev    next >
Encoding:
Text File  |  1993-07-11  |  660 b   |  29 lines

  1. #!/usr/local/bin/perl
  2. require ("find.pl");
  3. # getdirs - create a text file with directory names
  4. #           to be used with gee - gopher environment editor.
  5. #
  6. # Bill Middleton - wjm@feenix.metronet.com
  7. #           
  8. # configure 
  9. #
  10. $toplevel="/usr/pub/";
  11. $dirfilename = "./gopherdirs";
  12. #
  13. # end configure
  14. #
  15.  
  16. open(DIRS,">$dirfilename");
  17. &find($toplevel);
  18.  
  19. sub wanted{
  20. local($tmp)=$name;
  21. if(-d $tmp){
  22.   $tmp =~ s/^$toplevel//;        # must get rid of $toplevel in full path
  23.   $tmp =~ /\.cap/ && return;     # comment this to keep .cap dirs in list
  24.   $tmp =~ /\.index/ && return;   # comment this to keep .index dirs in list
  25.   print DIRS "$tmp\n";
  26. }
  27. }
  28. close (DIRS);
  29.